const path = require("path");

module.exports = {
  entry: "./client/src/index.ts",
  mode: "development",
  module: {
    rules: [
      {
        test:  /\.(ts|tsx)$/i,
        use: "ts-loader",
        exclude: /node_modules/,
      },
    ],
  },
  resolve: {
    extensions: [".tsx", ".ts", ".js"],
  },
  output: {
    filename: "index.js",
    path: path.resolve(__dirname, "client/src"),
  },
  devServer: {
    static: './',
    hot: true,
    compress: true,
    port: 8080,
    server: 'http',
},
};